home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS Toolkit
/
BBS Toolkit.iso
/
wildcat
/
wc30rec.zip
/
GLOTYPE.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1992-05-12
|
34KB
|
721 lines
unit GloType;
(******************************************************************
Global record structure for WILDCAT! version 3.5.
Copyright 1986,92 Mustang Software Inc. All rights reserved.
Last Revised 05-12-92
******************************************************************)
interface
uses
Dos,
TpDate,
Filer;
const
TAB = #9; { tab key }
BS = #8; { back space }
DEL = #127; { delete key }
LF = #10; { line feed }
CR = #13; { enter key }
CRLF = #13#10; { carriage return with line feed }
Space = #32; { space }
Underline = '_'; { underline key }
Comma = ','; { comma key }
Period = '.';
NonStop = -1; { for page pausing }
ShareMode = 66;
ReadOnlyMode = 64;
UserNameKey = 1;
UserSecKey = 2;
UserExpDateKey = 3;
UserAliasKey = 4;
MsgNumberKey = 1;
MsgOrigNumKey = 2;
MsgDestNumKey = 3;
MsgSubjectKey = 4;
MsgReceiveKey = 5;
MsgDeleteKey = 6;
FileNameKey = 1;
FileAreaKey = 2;
FileDateKey = 3;
FilePWKey = 4;
FileUpKey = 5;
FileKWKey = 6;
{------------------ Type Declarations ----------------------}
type
WcDatabases = (dbMsg, dbUser, dbFile);
CheckLockErrorFunc = function : Boolean;
Str02 = String[2];
Str03 = String[3];
Str05 = String[5];
Str07 = String[7];
Str08 = String[8];
Str09 = String[9];
Str10 = String[10];
Str11 = String[11];
Str12 = String[12];
Str13 = String[13];
Str14 = String[14];
Str15 = String[15];
Str16 = String[16];
Str18 = String[18];
Str19 = String[19];
Str20 = String[20];
Str21 = String[21];
Str23 = String[23];
Str25 = String[25];
Str26 = String[26];
Str30 = String[30];
Str35 = String[35];
Str40 = String[40];
Str50 = String[50];
Str51 = String[51];
Str60 = String[60];
Str64 = String[64];
Str75 = String[75];
Str79 = String[79];
Str80 = String[80];
Str128 = String[128];
{various bit set types}
NodeBitSetType = array[1..33] of Byte; { 250 bits }
Array1000Bits = array[1..126] of Byte; { 1000 bits }
LogOffType = (loNormal, loDropCarrier, loNoTime, loSysopForce, loAltMinus, loNoActivity, loEvent);
SysWindowType = (swNoWindow, swOrigWindow, swSmallWindow, swBigWindow);
AllChars = set of Char;
YmodemBlock = array[1..1029] of Char;
KeyArray = array[1..6] of Str10;
EditorType = (ePrompt, eNormal, eFullScreen);
MorePromptType = (ErasePrompt, NextLine);
FileDisplayType = (SLFileDisplay, DLFileDisplay, FullFileDisplay);
ExpertiseLevel = (Novice, Regular, Expert);
TransferType = (ttNone, ttAll, ttXmodem, ttXmodemCRC, ttYmodem, ttYmodemG,
ttXmodem1K, ttXmodem1KG, ttKermit, ttZmodem, ttAscii, ttExt1,
ttExt2, ttExt3, ttExt4, ttExt5, ttExt6, ttExt7, ttExt8, ttExt9, ttExt10);
SexType = (stUnKnown, stMale, stFemale);
const
{------ Btree Formats---------}
KeysDatabase : array[WcDatabases] of Byte = (6, 4, 6);
OpenDatabase : array[WcDatabases] of Boolean = (False, False, False);
LockDatabase : array[WcDatabases] of Boolean = (False, False, False);
{-------Array name constants--}
EditorName : array[EditorType] of Str11 = ('No default', 'Line Editor', 'Full Screen');
MoreName : array[MorePromptType] of Str10 = ('Erase Line', 'Skip Line');
ExpertName : array[ExpertiseLevel] of Str07 = ('Novice', 'Regular', 'Expert');
TranName : array[TransferType] of Str10 =
('NONE', 'No default', 'Xmodem', 'Xmodem/CRC', 'Ymodem', 'Ymodem/G', 'Xmodem/1K',
'Xmodem/1KG', 'Kermit', 'Zmodem', 'Ascii', 'Ext1', 'Ext2', 'Ext3', 'Ext4', 'Ext5', 'Ext6',
'Ext7', 'Ext8', 'Ext9', 'Ext10');
FileDName : array[FileDisplayType] of Str11 = ('Single line', 'Double line', 'Full');
OnOffName : array[Boolean] of Str03 = ('OFF', 'ON ');
YesNoName : array[Boolean] of Str03 = ('NO ', 'YES');
SexName : array[SexType] of Str13 = ('Not disclosed', 'Male', 'Female');
{------Door file formats------}
diMultiUser = $01; { Is a multi-user door }
diInUse = $02; { is being used by another node }
type
DoorInfoType = record
diFlags : Byte;
end;
{------Event formats------}
const
etSun = $01;
etMon = $02;
etTue = $04;
etWed = $08;
etThu = $10;
etFri = $20;
etSat = $40;
type
{.F-}
EventMethodType = (etFlex, etSoft, etHard);
EventShellType = (etShell, etTerminate);
EventType = record
Method : EventMethodType;
Action : Byte;
Active : Boolean;
NextExec,
LastExec : DateTimeRec;
DayBitSet : Byte;
ShellType : EventShellType;
BatchPath : PathStr;
end;
{------NodeInfo formats------}
const
niPagedDisplayed = $00001; { have we told them about their page }
niLptr = $00002; { node Lptr toggle }
niPage = $00004; { node page toggle }
niBell = $00008; { node bell toggle }
niKybd = $00010; { node Kybd toggle }
niLocalNext = $00020; { node Local next toggle }
niScreenWrite = $00040; { node screen write toggle }
niEventNext = $00080; { node event next toggle }
niBringDown = $00100; { node bring down toggle }
niKillCaller = $00200; { node log caller off toggle }
niPagingSysop = $00400; { node paging sysop flag }
niWindowsOn = $00800; { Sysop Windows are on }
niOnLocally = $01000; { User is on locally }
niMNPConnect = $02000; { Error free connect }
niSysopNext = $04000; { Sysop is next on BBS }
niUseVgaMode = $08000; { local monitor in VGA mode }
niNo300baud = $10000; { no 300 baud allowed }
niNo1200baud = $20000; { no 1200 baud allowed }
niNo2400baud = $40000; { no 2400 baud allowed }
{.F+}
type
NodeStatusType = (Down, Up, SigningOn, LoggedIn, Crash, EventProcessing, StayDown);
ChatStatusType = (Available, UnAvailable, Paged, InChat);
UserStatusType = (None, FileTransfer, EnteringMsg, InDoor, InDOS, PChat, GChat);
MasterInfoType = record
VersionId : Str05; { version number }
ActiveNodes : NodeBitSetType; { bitset of active nodes}
TotalCalls, { total number of calls }
TotalUsers, { total number of users }
TotalFiles, { total number of Files }
TotalMessages : LongInt; { total number of msgs }
TempCalls, { Temp stats calls }
TempMsgs, { temp stats messages }
TempDownloads, { temp stats downloads }
TempUploads, { temp stats uploads }
MiFlags : Word; { Global flags }
ConfAvail : Array1000Bits; { is conference available}
TempReset : DateTimeRec; { Date/Time last reset }
Padit : array[1..41] of Byte; { pad to same size as nodeinfotype}
end; { 244 bytes on 05/29/91 }
NodeInfoType = record
Security : Str10;
NodeStatus : NodeStatusType; { Up/Down, Etc.. }
ChatStatus : ChatStatusType; { Available, etc.. }
UserStatus : UserStatusType; { Entering a Message, etc.. }
SysWindow : SysWindowType; { status window }
CallersName : Str25; { name }
From : Str25; { city, st }
PrevCaller : Str50; { Last caller on node }
BaudRate : LongInt; { baud rate }
TimeCalled, { Date Time user Logged on }
PrevLogOff, { L/Callers time off }
TimeOff : DateTimeRec; { Time limit expired date/time }
RequestNode : Integer; { Node requesting chat }
nFlags, { Bit-mapped status flags }
QuoteIndex : LongInt; { Quote file index pointer }
CurConf : Word; {Conference user is in}
NumberOfCalls : LongInt; { totals calls received by node }
UserMsgFrom : Byte; { node user message is from }
UserMsgText : String[80]; {text for user message }
end; { 244 bytes on 05/29/91 }
{------Message formats------}
const
{.F-}
{standard msg flags}
mfPrivate = $001;
mfReceiveable = $002;
mfReceived = $004;
mfReceipt = $008;
mfCarboned = $010;
mfForwarded = $020;
mfEchoFlag = $040;
mfNoDelete = $080;
mfHasReplies = $100;
mfDeleted = $200;
mfTagged = $400; { reserved for internal use in Tomcat }
{.F+}
type
MsgStatusPtr = ^MsgStatusType;
MsgStatusType =
record
Status : LongInt;
LowMsg : Word;
HighMsg : Word;
ActiveMsg : Word;
LastExtract : Word;
Empty : array[0..493] of Byte;
Len : Word;
Next : LongInt;
end;
MsgHeaderPtr = ^MsgHeaderType;
MsgHeaderType =
record
Status : LongInt;
MsgNumber : Word;
From : String[36]; {extended from 25 for netmail}
FromTitle : String[10];
To_ : String[36]; {extended from 25 for netmail}
ToTitle : String[10];
Subject : String[72]; {extended from 25 for netmail}
DateTime : DateTimeRec;
ReadTime : DateTimeRec;
MsgFlags : Word;
ThreadRef : Word;
Reference : Word; {for uti and netmail replyto fields}
MsgBytes : Word; {bytes of text}
OrigAttachName : String[12];
AttachFileName : String[12];
UnUsed : array[1..26] of Byte;
end;
MsgRecPtr = ^MsgRecType;
MsgRecType =
record
Status : LongInt;
MsgNumber : Word;
From : String[36]; {extended from 25 for netmail}
FromTitle : String[10];
To_ : String[36]; {extended from 25 for netmail}
ToTitle : String[10];
Subject : String[72]; {extended from 25 for netmail}
DateTime : DateTimeRec;
ReadTime : DateTimeRec;
MsgFlags : Word;
ThreadRef : Word;
Reference : Word; {for UTI and netmail ReplyTo fields}
MsgBytes : Word; {bytes of text}
OrigAttachName : String[12];
AttachFileName : String[12];
UnUsed : array[1..26] of Byte; {wildcat only uses this for fido mail}
MsgText : array[0..12000] of Byte; {12001 bytes is max size, 150 * 79 chars}
end;
{------File formats------}
const
{.F-}
fiNeverOverwrite = $01; { Never allowed to overwrite the file }
fiNeverDelete = $02; { This file never gets deleted }
fiDontCharge = $04; { Don't charge against daily charges }
fiPasswordReq = $08; { Password is required }
fiUploadInProgress = $10; { file is being uploaded from another node }
fiOnCD = $20; { file is actually on a CD Rom }
fiOffLine = $40; { file is offline }
fiFailedScan = $80; { file failed virus scan }
{.F+}
type
FileRecPtr = ^FileRecordType;
FileRecordType = record { ALLFILES.DAT }
Status, { B-Tree Status }
Size : LongInt; { Size of the File }
FileName : Str12; { Name of the file }
Password : Str14; { 12 Byte password }
DateAndTime, { Date of the file }
LastAccessed : DateTimeRec; { Date of last access }
UploadedBy : Str25; { Who uploaded by }
Desc : Str60; { Description }
TotalMsgBytes, { number of characters }
FileToggles, { Bit Mask }
NumOfAccess, { Number of downloads }
Cost, { Cost of the file }
Area : Word; { file Area it is assigned to }
KeyWords : KeyArray; { Search Keywords}
StoredPath : PathStr; { Path for the file if on a CD }
MsgLines : array[1..2048] of Byte;
end;
FileHeaderType = record { ALLFILES.DAT }
Status, { B-Tree Status }
Size : LongInt; { Size of the File }
FileName : Str12; { Name of the file }
Password : Str14; { 12 Byte password }
DateAndTime, { Date of the file }
LastAccessed : DateTimeRec; { Date of last access }
UploadedBy : Str25; { Who uploaded by }
Desc : Str60; { Description }
TotalMsgBytes, { number of characters }
FileToggles, { Bit Mask }
NumOfAccess, { Number of downloads }
Cost, { Cost of the file }
Area : Word; { file Area it is assigned to }
KeyWords : KeyArray; { Search Keywords}
StoredPath : PathStr; { Path for the file if on a CD }
end;
{------Menu formats------}
const
MaxMenuItems = 25;
type
MenuNameType = (MainM, MsgM, FileM, SysopM);
MenuDescRecType = record
Desc : array[1..MaxMenuItems] of Str35;
Order : array[1..MaxMenuItems] of Byte;
CallLtr : array[1..MaxMenuItems] of Char;
Sec : array[1..MaxMenuItems] of Word;
end;
MenusDescRecType = array[MainM..SysopM] of MenuDescRecType;
{------File area/path formats------}
FileAreaRecType = record
AreaName : Str30;
AreaPath : array[1..4] of DirStr;
end;
{------Makewild formats------}
const
{.F-}
mwLogOffIfNotVerified = $00000001; { Ask New callers for phone }
mwSysopDropToDos = $00000002; { remote drop to DOS ok for Sysops }
mwDisplayQuoteDay = $00000004; { look for quote of the day }
mwColorAnsi = $00000008; { are color scrrens going to be offered }
mwDropOnExit = $00000010; { Offhook when f10 }
mwShowSec = $00000020; { show apssword on screen }
mwShowPWFiles = $00000040; { Display Password protected files }
mwUseClearScreens = $00000080; { Use clear screens in dynamic screens }
mwFreeFormPhone = $00000100; { format phone numbers }
mwUseExecSwap = $00000200; { shell exec to ems/disk }
mwUseEMSForOverlay = $00000400; { use ems for overlay buffer }
mwUseEMSForExecSwap = $00000800; { use ems for exec swap }
mwOverwriteChatFiles = $00001000; { reuse chat files }
mwLockOutForSecError = $00002000; { lock out for password error }
mwVerifyLocAtSignOn = $00004000; { Show name and location during login }
mwUnUsed1 = $00008000;
mwDynamicFileKeys = $00010000;{ Build file keywords based on short desc }
mwSysopReadPrivate = $00020000; { Sysop Ok to read private }
mwShowUserSec = $00040000;
mwPrinterOnline = $00080000;
mwBulletsOptional = $00100000; { Bulletins are optional }
mwTerminateOnDoors = $00200000;
mwAutoId = $00400000;
mwUseXmsForExecSwap = $00800000;
mwForce8N1 = $01000000;
mwDLOverTime = $02000000;
mwIndexWildcard = $04000000;
mwCopyOnCD = $08000000;
{.F+}
type
ScreenType = (mColor, mMono, mAuto);
ClosedType = (Open, Closed, ClosedComment, ClosedQuestionnaire);
DBProtectType = (NoProtection, MarkMode, SaveMode);
ScreenBlankType = (sbNone, sbBox, sbBlackOut, sbFireWorks);
ConsoleSecType = (cNone, cPassword, cNoConsole);
SettingSecType = (ssYes, ssMessage);
GetBaudType = (gbResult1, gbByCR, gbDTE, gbResult2);
AnswerType = (apRing, apAutoAnswer, apResult);
BaudType = (bUnKnown, bLocal, b300, b1200, b2400, b4800, b9600, b14400, b19200, b38400, b57600);
const
BaudNumber : array[b300..b57600] of Word = (300, 1200, 2400, 4800, 9600, 14400, 19200, 38400, 57600);
mpFixedRate = $01; { Lock DTE }
mpCtsRtsFlow = $02; { Use CTS/RTS flow Control }
mpX25Pad = $04;
type
ModemProfilePtr = ^ModemProfileType;
ModemProfileType = record
InitBaud : b300..b57600;
CommPort,
CommIrq,
CarrierDelay,
MpFlags,
FifoTrigger : Byte;
CommBase,
RingDelay,
DropDtrDelay,
PreLogDelay,
ResultDelay,
ResetDelay : Word;
AnswerPhone : AnswerType;
DetermineBaud : GetBaudType;
RingStr,
AnswerStr,
ModemReset : String[10];
OnHook,
OffHook : String[20];
ErrorStr,
ModemInit : String[40];
BaudStr : array[b300..b57600] of String[15];
end;
MakeWildRecord = record {MAKEWILD.DAT }
MWVersion : Str05; { makewild version }
SysFirst, { Sysop's First Name }
SysLast : Str15; { Sysop's Last Name }
FirstCall : Str25; { Date of First Call }
BBSName : Str30; { Name of the BBS }
FileDataBasePath,
UserDataBasePath, { ALLUSERS.DAT path }
NodeInfoPath,
MsgAttachPath : DirStr; { Master Path }
NewUserSec : String[10];
MonitorType : ScreenType; { Monitor type }
CloseOption : ClosedType; { Closed Board Options }
Network : NetSupportType; { type of network }
DataBaseOpenMode : DBProtectType; { open mode type }
ScreenBlankMode : ScreenBlankType;
ExtLtr : array[1..10] of Char; { Ext P/Calls }
ExtUpBatch, { Upload batch Names }
ExtDnBatch, { Download Batch Names }
ExtName : array[1..10] of Str12; { Ext Names }
ExtBatchDriven : array[1..10] of Boolean; { Batch }
ExtraMemForOverlay, { Extra Overlay Buff }
NodeId, { Node Id number }
SecTries, { number of password tries allowed }
LinesPage : Byte; {New Users Line Per Page default }
TotalDosHooks,
TotalDoors, { Total live programs }
MaxFileAreas,
MaxConfAreas,
FirstCallLimit : Word; { minutes allowed on 1st call }
MwFlags : LongInt;
DateFormat, { date format to use }
TimeFormat : Str40; { time format to use }
ActiveConfs : Array1000Bits;
RegString : String[7];
FlexEventInactivity : Word;
FlexEventForceTime : Time;
MenusDesc : MenusDescRecType;
DefaultExt : ExtStr;
ConsolePassword : String[15];
ConsoleSec : ConsoleSecType;
ChangePhone,
ChangeAlias,
ChangeBDate : SettingSecType;
ModemProfile : ModemProfileType;
end;
{------Global user formats------}
const
ufNeverDelete = $001; {!! }
ufChatPage = $002; { ok to page }
ufHotKey = $004; { use hot keys }
ufLockedOut = $008; { allowed user }
ufColorMenus = $010; { type of graphics }
ufReserved = $020;
ufQuoteOnReply = $040; { Auto Quote on reply }
ufClearBeforeMsg = $080; { Clear Screen before Msg }
ufBellAtLogin = $100; { Beep at login }
ufNoPrivMail = $200; { Don't allow reading of Private Mail }
ufNoDelMail = $400; { Don't allow reading of Deleted Mail }
ufNoPvtExport = $800; { Don't allow Tomcat to add to network user database }
const
cufReserved1 = $001;
cufSysopMail = $002; { Co-Sysop for Mail Maint. }
cufReserved2 = $004;
cufLockOut = $008; { Don't allow to join conference }
cufTitleOff = $010; { Turn Titles Off }
cufReserved3 = $020;
cufPerOnly = $040; { Reserved for TOMCAT! }
cufReserved4 = $080;
cufReserved5 = $100;
cufHaveMail = $200; { Have mail waiting in conference }
type
ConfUserType = record
cuFlags : Word;
cuLastRead : Word;
end;
ConfUserArray = array[0..999] of ConfUserType;
type
UserRecordPtr = ^UserRecordType;
UserRecordType = record { ALLUSERS.DAT }
{ User's History and Current Profile }
Status : LongInt; { Btree Status }
UserName : Str25; { Real User Name }
From : Str30; { location }
Password : Str14; { Password }
PhoneNumber, { User phone number }
DataNumber, { User Data number }
ComputerType : Str15; { Users Computer Type }
SecLevel : Str10;
Company,
Address1,
Address2,
City : Str30;
State : Str02;
Zip : Str10;
Country : Str25;
Title : Str10;
Alias : Str25;
NovellName : Str08;
Comment : array[1..2] of Str30; { Comment Field }
Sex : SexType;
uEditor : EditorType;
MorePrompt : MorePromptType; { Erase -MORE- }
Xpert : ExpertiseLevel; { Xpert level }
TransferMethod : TransferType; { Protocol }
FileDisplay : FileDisplayType;
LinesPerPage : Byte; { Lines Per Page }
TimeDate,
LastNewFiles : DateTimeRec; { Last time called }
FileAccess,
ConfAccess,
ConfScan : Array1000Bits; { Conf Joined }
ExpireDate,
MemoDate, { Extra Date Field }
UserSince, { Date First Called }
BirthDate : Date; { Users Birth Day }
uFlags,
ActiveConf, { Users Active Conference }
MsgsWritten, { Number of Messages Written }
Uploads, { Number of ULoads }
Downloads, { Number of DLoads }
TimesOn, { Number times on }
TimeLeft : Word; { Time left today }
DailyDL, { temp counter for daily download count }
DailyDK, { temp counter for daily K-bytes }
TotalUK, { Total K uploaded }
TotalDK, { Total K downlded }
MinutesLogged, { MinutesLogged On System }
SubScriptionBalance,
NetMailBalance : LongInt;
ExtraForDev : array[1..16] of Byte; { Not used by WCAT}
Confs : ConfUserArray; { Conference stuff }
end;
const
UserRecSize = SizeOf(UserRecordType)-SizeOf(ConfUserArray);
{------Security------}
type
SysopAccess = (saNo, saYes, saMaster);
DLRatioActionType = (DoNothing, WarnAboutRatio, NoMoreDownloads);
const
{---- Protocol Flags----}
pfAscii = $001;
pfXmodem = $002;
pfXmodemCRC = $004;
pfXmodem1k = $008;
pfXmodem1kG = $010;
pfYmodem = $020;
pfYmodemG = $040;
pfKermit = $080;
pfZmodem = $100;
pfExternal = $200;
sfFastLogin = $01; { Fast logins are supported }
sfOverwrite = $02; { Autohor may overwrite the file }
sfTNetFlag = $04; { Reserved for TOMCAT! }
type
{User Templates}
SecNameType = String[10];
SecRecPtr = ^SecRecType;
SecRecType = record
ProfileName,
ExpiredName : SecNameType; {Name used in pick list}
DisplayName : Str08; { Display File Name }
ConfAccess, {default conference access}
DLAccess, {default download access}
ULAccess, {default upload access}
DoorAccess : Array1000Bits; {default Door access}
AllowOnNode : NodeBitSetType; {which nodes has access}
SysopStatus : SysopAccess;
OverDLRatio : DLRatioActionType; {action taken when over up/down ratio}
srFlags,
UploadComp, {ratio for upload compensasion}
MaxRatio : Byte; {maximum upload/download ratio}
Menus : Char; {menu set for color displays}
MenuLevel, {level for menu access}
ProtocolFlag, {available protocol flags}
DTL, {daily time limit}
MaxLogon, {maximum time on per session}
VerifyBDate, {verify birthdate every # calls}
VerifyPhone, {verify phone ever # calls}
CostPerMinute, {number of units charged per minute}
MaxDL, {max daily downloads}
MaxDK : Word; {max daily download k}
end;
{------Conference formats ---------}
const
{-------- Conference Flags ---------}
{.F-}
cfPromptToKillRecMessages = $0001;
cfHighAscii = $0002;
cfAllowCarbon = $0004;
cfPrivateMsg = $0008;
cfForceAllPrivate = $0010;
cfReturnReceipt = $0020;
cfReserved1 = $0040;
cfUseAlias = $0080;
cfReserved2 = $0100;
cfAllowAttach = $0200;
cfReadOnly = $0400;
{.F+}
type
ConfMailType = (cmNormal, cmNetMail);
ValidNameType = (vnYes, vnNo, vnPrompt);
type
ConfDescPtr = ^ConfDescType;
ConfDescType = record
ConfName,
ConfOp : String[25];
ConfMail : ConfMailType;
FileAreaAccess : Array1000Bits;
BullPath,
QuesPath,
MenuPath,
HelpPath,
DisplayPath,
MsgPath : DirStr;
LinesForMsg : Byte;
ConfFlags,
ConfNumber,
TotalQues,
TotalBulletins : Word;
ValidNames : ValidNameType;
Reserved : Byte;
MaxMessages : Word;
end;
type
DosHookPtr = ^DosHookType;
DosHookType = record
Name : String[30];
ShellPath : PathStr;
end;
implementation
end.